Skip to content

ci: fix golangci-lint and remove unnecessary config#201

Open
arran4 wants to merge 1 commit intomainfrom
fix-golangci-lint-config-5255241111305228045
Open

ci: fix golangci-lint and remove unnecessary config#201
arran4 wants to merge 1 commit intomainfrom
fix-golangci-lint-config-5255241111305228045

Conversation

@arran4
Copy link
Copy Markdown
Owner

@arran4 arran4 commented Apr 5, 2026

Removed the unnecessary lint config and updated the GitHub Actions versions to support the targeted Go version (1.25.0).


PR created automatically by Jules for task 5255241111305228045 started by @arran4

Removed `.golangci.yml` as it's not strictly necessary (mostly relying on defaults).
Updated GitHub Actions versions to `actions/setup-go@v6` and `golangci/golangci-lint-action@v9` to support Go 1.25.0 as specified in the project's instructions.

Co-authored-by: arran4 <111667+arran4@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@arran4
Copy link
Copy Markdown
Owner Author

arran4 commented Apr 5, 2026

@jules resolve lint issues please:

run golangci-lint
  Running [/home/runner/golangci-lint-2.11.4-linux-amd64/golangci-lint config path] in [/home/runner/work/gobookmarks/gobookmarks] ...
  Running [/home/runner/golangci-lint-2.11.4-linux-amd64/golangci-lint run] in [/home/runner/work/gobookmarks/gobookmarks] ...
  Error: cmd/gobookmarks/db_users_command.go:60:16: Error return value of `db.Close` is not checked (errcheck)
  	defer db.Close()
  	              ^
  Error: cmd/gobookmarks/help_command.go:43:19: Error return value of `(*flag.FlagSet).Parse` is not checked (errcheck)
  	c.FlagSet().Parse(args)
  	                 ^
  Error: cmd/gobookmarks/serve.go:455:22: Error return value of `certFile.Close` is not checked (errcheck)
  	defer certFile.Close()
  	                    ^
  Error: cmd/gobookmarks/serve.go:464:21: Error return value of `keyFile.Close` is not checked (errcheck)
  	defer keyFile.Close()
  	                   ^
  Error: cmd/gobookmarks/test_verification_template_command.go:306:11: Error return value of `w.Write` is not checked (errcheck)
  			w.Write(output)
  			       ^
  Error: config.go:283:15: Error return value of `f.Close` is not checked (errcheck)
  	defer f.Close()
  	             ^
  Error: config.go:298:13: Error return value of `os.Setenv` is not checked (errcheck)
  			os.Setenv(key, val)
  			         ^
  Error: db.go:23:11: Error return value of `db.Close` is not checked (errcheck)
  		db.Close()
  		        ^
  Error: db.go:28:11: Error return value of `db.Close` is not checked (errcheck)
  		db.Close()
  		        ^
  Error: favicon_proxy_test.go:15:10: Error return value of `w.Write` is not checked (errcheck)
  		w.Write([]byte("<link rel='icon' href='/favicon.ico'>"))
  		       ^
  Error: favicon_proxy_test.go:21:10: Error return value of `w.Write` is not checked (errcheck)
  		w.Write(icon)
  		       ^
  Error: provider_sql.go:68:18: Error return value of `rows.Close` is not checked (errcheck)
  	defer rows.Close()
  	                ^
  Error: provider_sql.go:91:18: Error return value of `rows.Close` is not checked (errcheck)
  	defer rows.Close()
  	                ^
  Error: provider_sql.go:123:18: Error return value of `rows.Close` is not checked (errcheck)
  	defer rows.Close()
  	                ^
  Error: provider_sql.go:229:14: Error return value of `tx.Rollback` is not checked (errcheck)
  		tx.Rollback()
  		           ^
  Error: provider_sql.go:233:14: Error return value of `tx.Rollback` is not checked (errcheck)
  		tx.Rollback()
  		           ^
  Error: provider_sql.go:244:14: Error return value of `tx.Rollback` is not checked (errcheck)
  		tx.Rollback()
  		           ^
  Error: funcs.go:224:8: ineffectual assignment to bookmark (ineffassign)
  			var bookmark = defaultBookmarks
  			    ^
  Error: funcs.go:253:8: ineffectual assignment to bookmark (ineffassign)
  			var bookmark = defaultBookmarks
  			    ^
  Error: funcs.go:293:8: ineffectual assignment to bookmark (ineffassign)
  			var bookmark = defaultBookmarks
  			    ^
  Error: authHandlers.go:32:7: QF1008: could remove embedded field "CoreData" from selector (staticcheck)
  	data.CoreData.UserRef = ""
  	     ^
  Error: bookmarkTabEdit.go:104:19: QF1001: could apply De Morgan's law (staticcheck)
  	includeHeader := !(idx == 0 && newName == "")
  	                 ^
  Error: bookmark_methods_test.go:122:11: ST1023: should omit type BookmarkList from declaration; it will be inferred from the right-hand side (staticcheck)
  	var list BookmarkList = tabs
  	         ^
  Error: bookmark_methods_test.go:136:11: ST1023: should omit type BookmarkList from declaration; it will be inferred from the right-hand side (staticcheck)
  	var list BookmarkList = tabs
  	         ^
  Error: bookmark_methods_test.go:146:11: ST1023: should omit type BookmarkList from declaration; it will be inferred from the right-hand side (staticcheck)
  	var list BookmarkList = tabs
  	         ^
  Error: bookmark_model.go:188:5: QF1001: could apply De Morgan's law (staticcheck)
  	if !(first && t.Name == "") {
  	   ^
  Error: cmd/gobookmarks/db_reset_password_command.go:8:2: ST1001: should not use dot imports (staticcheck)
  	. "github.com/arran4/gobookmarks"
  	^
  Error: cmd/gobookmarks/db_users_command.go:7:2: ST1001: should not use dot imports (staticcheck)
  	. "github.com/arran4/gobookmarks"
  	^
  Error: cmd/gobookmarks/main.go:9:2: ST1001: should not use dot imports (staticcheck)
  	. "github.com/arran4/gobookmarks"
  	^
  Error: cmd/gobookmarks/serve.go:480:4: SA4020: unreachable case clause: net/http.Handler will always match before net/http.HandlerFunc (staticcheck)
  			case http.HandlerFunc:
  			^
  Error: cmd/gobookmarks/test_verification_template_command.go:152:9: SA9003: empty branch (staticcheck)
  	} else {
  	       ^
  Error: config.go:7:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
  	"io/ioutil"
  	^
  Error: provider_github.go:53:12: SA1019: github.NewEnterpriseClient is deprecated: Use NewClient(httpClient).WithOptions(WithEnterpriseURLs(baseURL, uploadURL)) instead. (staticcheck)
  	c, err := github.NewEnterpriseClient(server+"/api/v3/", server+"/upload/v3/", httpClient)
  	          ^
  Error: provider_github.go:153:99: SA4009: argument branch is overwritten before first use (staticcheck)
  func (p GitHubProvider) getDefaultBranch(ctx context.Context, user string, client *github.Client, branch string) (string, error) {
                                                                                                    ^
  Error: provider_github.go:163:3: SA4009(related information): assignment to branch (staticcheck)
  		branch = *rep.DefaultBranch
  		^
  Error: provider_gitlab.go:56:53: SA1019: gitlab.Client is deprecated: use gitlab.com/gitlab-org/api/client-go instead. See https://gitlab.com/gitlab-org/api/client-go (staticcheck)
  func (GitLabProvider) client(token *oauth2.Token) (*gitlab.Client, error) {
                                                      ^
  Error: provider_gitlab.go:61:9: SA1019: gitlab.NewOAuthClient is deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. See https://gitlab.com/gitlab-org/api/client-go (staticcheck)
  	return gitlab.NewOAuthClient(token.AccessToken, gitlab.WithBaseURL(server))
  	       ^
  Error: provider_gitlab.go:185:82: SA1019: gitlab.Client is deprecated: use gitlab.com/gitlab-org/api/client-go instead. See https://gitlab.com/gitlab-org/api/client-go (staticcheck)
  func (GitLabProvider) getDefaultBranch(ctx context.Context, user string, client *gitlab.Client, branch string) (string, error) {
                                                                                   ^
  Error: provider_gitlab.go:203:3: SA4009(related information): assignment to branch (staticcheck)
  		branch = p.DefaultBranch
  		^
  Error: authHandlers.go:109:7: type ErrorData is unused (unused)
  	type ErrorData struct {
  	     ^
  Error: autoRefreshPage.go:27:6: func taskRedirectWithoutQueryArgs is unused (unused)
  func taskRedirectWithoutQueryArgs(w http.ResponseWriter, r *http.Request) {
       ^
  Error: bookmark_model.go:567:6: func indexAfterColumn is unused (unused)
  func indexAfterColumn(tabs BookmarkList, page *BookmarkPage, colIdx int) int {
       ^
  Error: provider_access.go:55:6: func setCachedBookmarks is unused (unused)
  func setCachedBookmarks(user, ref, bookmarks, sha string) {
       ^
  43 issues:
  * errcheck: 17
  * ineffassign: 3
  * staticcheck: 19
  * unused: 4
  
  Error: issues found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant